package com.zrrd.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


@Schema(name = "UserUpdateAvatarDTO", description = "用户修改头像DTO实体类")
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties("handler")
public class UserUpdateAvatarDTO implements Serializable {

    @Schema(description = "用户表主键", required = true, example = "1")
    @NotNull(message = "修改头像业务中主键不能为空")
    private Integer id;

    @Schema(description = "用户头像文件", required = true)
    @NotNull(message = "修改头像文件不能为空")
    @JsonProperty("avatar-file")
    private MultipartFile avatarFile;
}
